package design.pattern.factory.factoryMethod;


/**
 * @description: 工厂方法模式测试
 * @author: liuzhangcheng
 **/
public class FactoryMethodTest {
    public static void main(String[] args) {
        ICourseFactory courseFactory = new JacaCourseFactory();
        ICourse course = courseFactory.create();
        course.record();

        courseFactory = new ScalaCourseFactory();
        course = courseFactory.create();
        course.record();
    }
}
